module Base
{
	vehicle fhqLoyaleWag_4WD
	{
		mechanicType = 1,
		offRoadEfficiency = 0.95,
		engineRepairLevel = 4,
		playerDamageProtection = 0.7,

		model
		{
			file = fhqLoyaleWagBody,
			scale = 1.8200,
			offset = 0.0000 0.1813 0.0330,
		}

		spawnOffsetY = 0.12999995,

		skin
		{
			texture = Vehicles/vehicle_fhqLoyaleWag4WD_shell,
		}

		textureMask = Vehicles/vehicle_fhqLoyaleWag_mask,
		textureLights = Vehicles/vehicle_fhqLoyaleWag_lights,
		textureDamage1Overlay = Vehicles/Veh_Blood_Mask,
		textureDamage2Overlay = Vehicles/Veh_Blood_Hvy,
		textureDamage1Shell = Vehicles/Veh_Damage1,
		textureDamage2Shell = Vehicles/Veh_Damage2,
		textureRust = Vehicles/Veh_Rust,

		sound
		{
			engine = VehicleEngineCarNormal,
			engineStart = VehicleEngineCarNormal,
			engineTurnOff = VehicleEngineCarNormal,
			horn = VehicleHornStandard,
			ignitionFail = VehicleIgnitionFailCarNormal,
		}

		extents = 0.7692 0.5824 2.0989,
		mass = 860,
		physicsChassisShape = 0.7692 0.5824 2.0989,
		centerOfMassOffset = 0.0000 0.2857 0.0000,
		shadowExtents = 0.8168 2.2255,
		shadowOffset = 0.0000 0.0000,
		engineForce = 3500,
		engineLoudness = 63,
		engineQuality = 70,
		maxSpeed = 90f,
		gearRatioCount = 3,
		stoppingMovementForce = 2.0f,
		rollInfluence = 0.7f,
		steeringIncrement = 0.04,
		steeringClamp = 0.3,
		suspensionStiffness = 30,
		suspensionCompression = 2.0,
		suspensionDamping = 2.2,
		maxSuspensionTravelCm = 15,
		suspensionRestLength = 0.3f,
		wheelFriction = 1.8f,
		frontEndHealth = 150,
		rearEndHealth = 150,
		seats = 4,

		wheel FrontLeft
		{
			front = true,
			offset = 0.3187 -0.1923 0.5879,
			radius = 0.12f,
			width = 0.30f,
		}

		wheel FrontRight
		{
			front = true,
			offset = -0.3187 -0.1923 0.5879,
			radius = 0.12f,
			width = 0.30f,
		}

		wheel RearLeft
		{
			front = false,
			offset = 0.3187 -0.1923 -0.5879,
			radius = 0.12f,
			width = 0.30f,
		}

		wheel RearRight
		{
			front = false,
			offset = -0.3187 -0.1923 -0.5879,
			radius = 0.12f,
			width = 0.30f,
		}

		template = PassengerSeat4,

		passenger FrontLeft
		{
			position inside
			{
				offset = 0.1538 -0.0110 -0.0714,
				rotate = 0.0000 0.0000 0.0000,
			}

			position outside
			{
				offset = 0.5275 -0.3407 0.0000,
				rotate = 0.0000 0.0000 0.0000,
				area = SeatFrontLeft,
			}
		}

		passenger FrontRight
		{
			position inside
			{
				offset = -0.1538 -0.0110 -0.0714,
				rotate = 0.0000 0.0000 0.0000,
			}

			position outside
			{
				offset = -0.5275 -0.3407 0.0000,
				rotate = 0.0000 0.0000 0.0000,
				area = SeatFrontRight,
			}
		}

		passenger RearLeft
		{
			position inside
			{
				offset = 0.1538 -0.0110 -0.3791,
				rotate = 0.0000 0.0000 0.0000,
			}

			position outside
			{
				offset = 0.5275 -0.3407 -0.3681,
				rotate = 0.0000 0.0000 0.0000,
				area = SeatRearLeft,
			}
		}

		passenger RearRight
		{
			position inside
			{
				offset = -0.1538 -0.0110 -0.3791,
				rotate = 0.0000 0.0000 0.0000,
			}

			position outside
			{
				offset = -0.5275 -0.3407 -0.3681,
				rotate = 0.0000 0.0000 0.0000,
				area = SeatRearRight,
			}
		}

		area Engine
		{
			xywh = 0.0000 1.2637 0.7692 0.4286,
		}

		area TruckBed
		{
			xywh = 0.0000 -1.2637 0.7692 0.4286,
		}

		area SeatFrontLeft
		{
			xywh = 0.6319 0.1703 0.4945 0.4945,
		}

		area SeatFrontRight
		{
			xywh = -0.6319 0.1703 0.4945 0.4945,
		}

		area SeatRearLeft
		{
			xywh = 0.6319 -0.2802 0.4945 0.4945,
		}

		area SeatRearRight
		{
			xywh = -0.6319 -0.2802 0.4945 0.4945,
		}

		area GasTank
		{
			xywh = -0.6099 -0.6209 0.4505 0.4505,
		}

		area TireFrontLeft
		{
			xywh = 0.6099 0.6264 0.4505 0.4505,
		}

		area TireFrontRight
		{
			xywh = -0.6099 0.6264 0.4505 0.4505,
		}

		area TireRearLeft
		{
			xywh = 0.6099 -0.5495 0.4505 0.4505,
		}

		area TireRearRight
		{
			xywh = -0.6099 -0.5495 0.4505 0.4505,
		}

		template = TrunkDoor,
		
		part TrunkDoor
		{
			anim Open
			{
				sound = VehicleTrunkOpenSportsCar,
			}

			anim Close
			{
				sound = VehicleTrunkCloseSportsCar,
			}

			anim Lock
			{
				sound = LockVehicleDoorSportsCar,
			}

			anim Unlock
			{
				sound = UnlockVehicleDoorSportsCar,
			}

			anim IsLocked
			{
				sound = VehicleDoorIsLockedSportsCar,
			}
			
			table uninstall
			{
				requireUninstalled = WindshieldRear,
			}
		}
		
		template = Trunk/part/TruckBed,
		
		part TruckBed
		{
			container
			{
				capacity = 60,
			}
		}
		
		template = Seat/part/SeatFrontLeft,
		template = Seat/part/SeatFrontRight,
		template = Seat/part/SeatRearLeft,
		template = Seat/part/SeatRearRight,
		template = GloveBox,
		template = GasTank,
		template = Battery,
		template = Engine,
		template = Muffler,

		part Muffler
		{
			model Default
			{
				file = fhqLoyaleExhaust,
			}
		}

		template = EngineDoor,

		part Heater
		{
			category = engine,

			lua
			{
				update = Vehicles.Update.Heater,
			}
		}

		part PassengerCompartment
		{
			category = nodisplay,

			lua
			{
				update = Vehicles.Update.PassengerCompartment,
			}
		}

		template = Windshield/part/Windshield,
		template = Windshield/part/WindshieldRear,
		
		part WindshieldRear
		{
			parent = TrunkDoor,

			table install
			{
				requireInstalled = TrunkDoor,
			}
		}
		
		template = Window/part/WindowFrontLeft,
		template = Window/part/WindowFrontRight,
		template = Window/part/WindowRearLeft,
		template = Window/part/WindowRearRight,
		template = Door/part/DoorFrontLeft,
		template = Door/part/DoorFrontRight,
		template = Door/part/DoorRearLeft,
		template = Door/part/DoorRearRight,

		part DoorFrontLeft
		{
			model Default
			{
				file = fhqLoyaleLMirror,
			}
		}

		part DoorFrontRight
		{
			model Default
			{
				file = fhqLoyaleRMirror,
			}
		}

		template = Tire,

		part TireFrontLeft
		{
			model InflatedTirePlusWheel
			{
				file = fhqMZWheelSub4WDL,
			}
		}

		part TireFrontRight
		{
			model InflatedTirePlusWheel
			{
				file = fhqMZWheelSub4WDR,
			}
		}

		part TireRearLeft
		{
			model InflatedTirePlusWheel
			{
				file = fhqMZWheelSub4WDL,
			}
		}

		part TireRearRight
		{
			model InflatedTirePlusWheel
			{
				file = fhqMZWheelSub4WDR,
			}
		}

		template = Brake,
		template = Suspension,
		template = Radio,
		template = Headlight,

		attachment trailer
		{
			offset = 0.0000 -0.0769 -1.0824,
			rotate = 0.0000 0.0000 0.0000,
			zoffset = -1.0000,
		}

		attachment trailerfront
		{
			offset = 0.0000 -0.0330 1.0110,
			rotate = 0.0000 0.0000 0.0000,
			zoffset = 1.0000,
		}
	}
}
